// const fetch = require('node-fetch')
//         console.log('res ', res);


//         return res.json()
//     }).then(res2 => {
//         console.log('res2', res2);
//         return res2
//     })
//     console.log('a', a);

// }

// main()

// async function main(){
//     let p = await new Promise(function(resolve, reject){resolve()}).then(v => 'xxx').then(v => console.log(v))
//     console.log('p', p)
// }

// function runAsync1() {
//     return new Promise(resolve=>{
//         console.log("running runAysnc1."); 
//         resolve("r1")
//     });
// }
function runAsync2() {
    return new Promise(resolve=>{
        console.log("running runAysnc2."); 
        resolve("r2")
    });
}
function runAsync3() {
    return new Promise(resolve=>{
        console.log("running runAysnc3."); 
        resolve("r3")
    });
}
let runAsync1 = ()=>{
    return new Promise(resolve=>{
        console.log("running runAysnc1."); 
        resolve("r1")
    });
}
Promise.all([runAsync1(), runAsync2(), runAsync3()]).then(results=>console.log(results));